<style>
    .ly-sex{
        color: #fff;
        font-size: 12px;
        margin-left: 5px;
        padding: 3px 8px;
        border-radius: 3px;
    }
    .ly-sex-0{
        background: #E5E9F2;
    }
    .ly-sex-1{
        background: #68A5EA;
    }
    .ly-sex-2{
        background: #FD6B94;
    }
</style>
<template>
    <span class="ly-sex" :class="['ly-sex-'+sex]">
           {{sex|ly_sex}}
    </span>

</template>
<script>
    Rap.define('', '', function () {
        return {
            name: 'ly-sex',
            filters:{
                ly_sex:function (value) {
                    var sexes = ["未知", "男", "女"];
                    return sexes[value];
                }
            },
            props: {
                 sex:{
                     default:0
                 }
            }, watch: {

            }, data: function () {
                return {};
            }, created: function () {
            }, destroyed: function () {

            }, methods: {}
        }
    });
</script>


